#pragma once

#include "ISystem.h"
#include "Modules.h"


struct IWindow;
class CTimer;
class CConsole;
class CLog;

class CSystem: public ISystem
{
public:
	CSystem();
	virtual ~CSystem();

	virtual bool	Init();
	virtual void	Shutdown();
	virtual bool	IsShuttingDown() const;

	virtual SGlobalEnvironment* GetGlobalEnvironment();
	virtual IWindow* GetWindow();
	virtual ITimer* GetTimer();
	virtual ILog* GetLog();
	virtual CProfiler* GetProfiler();

	virtual void Update();

private:
	SGlobalEnvironment	m_Env;
	bool				m_bNeedShutdown;

	IWindow*		m_pWindow;
	CTimer*			m_pTimer;
	CConsole*		m_pConsole;
	CProfiler*	m_pProfiler;
	CLog*				m_pLog;
};

REGISTER_GAME_MODULE(ISystem, CSystem)